<%= page_title "#{@environment.new_record? ? 'New' : 'Edit'} Environment" %>

<%= render_lock @environment %>

<section>
  <%= form_for @environment, html: { class: "form-horizontal" } do |form| %>
    <%= render 'shared/errors', object: @environment %>

    <%= form.input :name, required: true %>
    <%= form.input :permalink, required: true if @environment.persisted? %>
    <%= form.input :production, as: :check_box, label: 'Affects Production' %>

    <%= form.actions do %>
      | <%= link_to_history @environment %>
    <% end %>
  <% end %>

  <%= render "locks/button", lock: @environment.lock, resource: @environment %>
</section>
